package com.bins.springboot.dubbo.api.spi;

import com.bins.springboot.dubbo.api.spi.Robot;

import java.util.ServiceLoader;

public class Test {
    public static void main(String[] args) {
        ServiceLoader<Robot> serviceLoader = ServiceLoader.load(Robot.class);
        System.out.println("Java SPI");
        serviceLoader.forEach(Robot::sayHello);
        System.out.println("end");
    }

}
